<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<link href="${pageContext.request.contextPath}/css/sys.css" type="text/css" rel="stylesheet" />

</head>

<body >
 <table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr>
    <td class="topg"></td>
  </tr>
</table>

<table border="0" cellspacing="0" cellpadding="0"  class="wukuang"width="100%">
  <tr>
    <td width="1%"><img src="${pageContext.request.contextPath}/images/tleft.gif"/></td>
    <td width="39%" align="left">[课程类别]</td>
   
    <td width="57%"align="right">
		<a href="javascript:void(0)" onclick="javascript:document.forms[0].submit();">
			<img src="${pageContext.request.contextPath}/images/button/gaojichaxun.gif" />
		</a>      
    	<%--编辑前：添加类别 --%>
    	<a href="${pageContext.request.contextPath}/pages/coursetype/addOrEditCourse.jsp">
	       	<img src="${pageContext.request.contextPath}/images/button/tianjia.gif" />
    	</a>
    </td>
    <td width="3%" align="right"><img src="${pageContext.request.contextPath}/images/tright.gif"/></td>
  </tr>
</table>


<%--条件查询 start --%>

<form action="${pageContext.request.contextPath}/findCourse.do" method="post">
	<table width="88%" border="0" class="emp_table" style="width:80%;">
	  <tr>
	    <td width="10%">课程名称：</td>
	    <td><input type="text" name="courseName" size="30" value="" /></td>
	  </tr>
	  <tr>  
	    <td >总学时：</td>
	    <td ><input type="text" name="totalStart" size="12" value="1" />  至  <input type="text" name="totalEnd" size="12" value="10000" /></td>
	  </tr>
	</table>
</form>

<%--条件查询 end --%>

<table border="0" cellspacing="0" cellpadding="0" style="margin-top:5px;">
  <tr>
    <td ><img src="${pageContext.request.contextPath}/images/result.gif"/></td>
  </tr>
</table>
<table width="97%" border="1" >
  
  <tr class="henglan" style="font-weight:bold;">
    <td width="14%" align="center">名称</td>
    <td width="33%" align="center">简介</td>
    <td width="13%" align="center">总学时</td>
    <td width="18%" align="center">收费标准</td>
	<td width="11%" align="center">编辑</td>
  </tr>
  <%--数据展示，单行：tabtd1；双行：tabtd2 --%>
  <c:forEach items="${pageCourse.courses}" var="course">
   <tr class="tabtd1">
	    <td align="center">${course.courseName } </td>
	    <td align="center">${course.remark } </td>
	    <td align="center">${course.total }</td>
	    <td align="center">${course.courseCost }</td>
	  	<td width="11%" align="center">
	  		
	  		<a href="${pageContext.request.contextPath}/preupdateCourse.do?courseTypeId=${course.courseTypeId}&&courseName=${course.courseName}&&courseCost=${course.courseCost}&&total=${course.total}&&remark=${course.remark}"><img src="${pageContext.request.contextPath}/images/button/modify.gif" class="img" /></a>
	  	</td>
	  </tr>
  </c:forEach>
 
	
 
</table>
<table border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="right">
    	<span>第${pageCourse.page}/${pageCourse.totalpage}页</span>
    	<c:if test="${pageCourse.page==1||pageCourse.totalpage==1 }">
    	   <span>
        	<a href="${pageContext.request.contextPath}/findbypageCourses.do?page=1">[首页]</a>&nbsp;&nbsp;
            <a href="${pageContext.request.contextPath}/findbypageCourses.do?page=${pageCourse.page+1}">[下一页]</a>&nbsp;&nbsp;
            <a href="${pageContext.request.contextPath}/findbypageCourses.do?page=${pageCourse.totalpage}">[尾页]</a>
        </span>
    	</c:if>
    	<c:if test="${pageCourse.page==pageCourse.totalpage&&pageCourse.totalpage>1 }">
    		<a href="${pageContext.request.contextPath}/findbypageCourses.do?page=1">[首页]</a>&nbsp;&nbsp;
            <a href="${pageContext.request.contextPath}/findbypageCourses.do?page=${pageCourse.page-1}">[上一页]</a>&nbsp;&nbsp;
            <a href="${pageContext.request.contextPath}/findbypageCourses.do?page=${pageCourse.totalpage}">[尾页]</a>
    	</c:if>
    	<c:if test="${pageCourse.page>1&&pageCourse.page<pageCourse.totalpage }">
        <span>
        	<a href="${pageContext.request.contextPath}/findbypageCourses.do?page=1">[首页]</a>&nbsp;&nbsp;
            <a href="${pageContext.request.contextPath}/findbypageCourses.do?page=${pageCourse.page-1}">[上一页]</a>&nbsp;&nbsp;
            <a href="${pageContext.request.contextPath}/findbypageCourses.do?page=${pageCourse.page+1}">[下一页]</a>&nbsp;&nbsp;
            <a href="${pageContext.request.contextPath}/findbypageCourses.do?page=${pageCourse.totalpage}">[尾页]</a>
        </span>
        </c:if>
    </td>
  </tr>
</table>
</body>
</html>
